package
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	
	import org.input.KeyboardInput;
	import org.libspark.betweenas3.MacEffect;
	import org.libspark.betweenas3.utils.BitmapUtil;

	[SWF(width="960",height="560",frameRate="60")]
	public class test extends Sprite
	{
		private var img:UI_001_MessagePanel;
		private var effect:MacEffect;
		private var _input:KeyboardInput;
		public function test()
		{
			img = new UI_001_MessagePanel();
			
			var bmp:Bitmap = BitmapUtil.drawBitmap(img,true);
			bmp.smoothing = true;
//			this.addChild(bmp);
//			this.addChild(new Bitmap(new UI_BMP_TEST()))
			effect = new MacEffect(this,bmp);
			stage.addEventListener(MouseEvent.CLICK,click);
			
			_input = new KeyboardInput(stage);
			trace(_input.isKeyDown);
		}
		
		private var b:Boolean = true;
		private function click(e:MouseEvent):void
		{
			trace(_input.isKeyDown);
			if(!b)
			{
				effect.show(mouseX,mouseY);
			}else
			{
				effect.hide(mouseX,mouseY);
			}
			b = !b;
		}
	}
}